import React from 'react';
import {useLocation} from "react-router-dom";

function Index(props) {
    const {state} = useLocation()
    return (
        <div>
            <h3>state参数-首页</h3>
            <p>a:{state?.a}</p>
            <p>b:{state?.b}</p>
        </div>
    );
}

export default Index;